package com.clear.honghefinance.biz.modules.dictionary.enums;

import lombok.Getter;

import java.util.Objects;

/**
 * 数据字典分类枚举
 */
@Getter
public enum DataDictionaryCategoryEnum {

    INDUSTRY("HANG_YE", "行业"),
    ACCOUNTING_RULES("KUAI_JI_ZHUN_ZE", "会计准则");

    private final String message;
    private final String code;

    DataDictionaryCategoryEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static DataDictionaryCategoryEnum getMessageByCode(String codeVal) {
        for (DataDictionaryCategoryEnum dataDictionaryCategoryEnum : DataDictionaryCategoryEnum.values()) {
            if (Objects.equals(dataDictionaryCategoryEnum.code, codeVal)) {
                return dataDictionaryCategoryEnum;
            }
        }
        return null;
    }
}
